// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Elastic.Clients.Elasticsearch.Features;

public partial class FeaturesNamespacedClient : NamespacedClientProxy
{
	/// <summary>
	/// <para>
	/// Initializes a new instance of the <see cref="FeaturesNamespacedClient"/> class for mocking.
	/// </para>
	/// </summary>
	protected FeaturesNamespacedClient() : base()
	{
	}

	internal FeaturesNamespacedClient(ElasticsearchClient client) : base(client)
	{
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetFeaturesResponse GetFeatures(GetFeaturesRequest request)
	{
		request.BeforeRequest();
		return DoRequest<GetFeaturesRequest, GetFeaturesResponse, GetFeaturesRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFeaturesResponse> GetFeaturesAsync(GetFeaturesRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetFeaturesRequest, GetFeaturesResponse, GetFeaturesRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetFeaturesResponse GetFeatures(GetFeaturesRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<GetFeaturesRequestDescriptor, GetFeaturesResponse, GetFeaturesRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetFeaturesResponse GetFeatures()
	{
		var descriptor = new GetFeaturesRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<GetFeaturesRequestDescriptor, GetFeaturesResponse, GetFeaturesRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetFeaturesResponse GetFeatures(Action<GetFeaturesRequestDescriptor> configureRequest)
	{
		var descriptor = new GetFeaturesRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<GetFeaturesRequestDescriptor, GetFeaturesResponse, GetFeaturesRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFeaturesResponse> GetFeaturesAsync(GetFeaturesRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFeaturesRequestDescriptor, GetFeaturesResponse, GetFeaturesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFeaturesResponse> GetFeaturesAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetFeaturesRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFeaturesRequestDescriptor, GetFeaturesResponse, GetFeaturesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFeaturesResponse> GetFeaturesAsync(Action<GetFeaturesRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetFeaturesRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFeaturesRequestDescriptor, GetFeaturesResponse, GetFeaturesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ResetFeaturesResponse ResetFeatures(ResetFeaturesRequest request)
	{
		request.BeforeRequest();
		return DoRequest<ResetFeaturesRequest, ResetFeaturesResponse, ResetFeaturesRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetFeaturesResponse> ResetFeaturesAsync(ResetFeaturesRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ResetFeaturesRequest, ResetFeaturesResponse, ResetFeaturesRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ResetFeaturesResponse ResetFeatures(ResetFeaturesRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<ResetFeaturesRequestDescriptor, ResetFeaturesResponse, ResetFeaturesRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ResetFeaturesResponse ResetFeatures()
	{
		var descriptor = new ResetFeaturesRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<ResetFeaturesRequestDescriptor, ResetFeaturesResponse, ResetFeaturesRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ResetFeaturesResponse ResetFeatures(Action<ResetFeaturesRequestDescriptor> configureRequest)
	{
		var descriptor = new ResetFeaturesRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ResetFeaturesRequestDescriptor, ResetFeaturesResponse, ResetFeaturesRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetFeaturesResponse> ResetFeaturesAsync(ResetFeaturesRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ResetFeaturesRequestDescriptor, ResetFeaturesResponse, ResetFeaturesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetFeaturesResponse> ResetFeaturesAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new ResetFeaturesRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<ResetFeaturesRequestDescriptor, ResetFeaturesResponse, ResetFeaturesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Resets the internal state of features, usually by deleting system indices
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetFeaturesResponse> ResetFeaturesAsync(Action<ResetFeaturesRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ResetFeaturesRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ResetFeaturesRequestDescriptor, ResetFeaturesResponse, ResetFeaturesRequestParameters>(descriptor, cancellationToken);
	}
}